<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.json"};
  </script>

  <meta name="description" content="​        原文链接：http:&#x2F;&#x2F;www.dengfoc.com&#x2F;#&#x2F;dengfoc&#x2F;%E7%81%AF%E5%93%A5%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%86%99FOC%E7%AE%97%E6%B3%95&#x2F;5.1FOC%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%8">
<meta property="og:type" content="article">
<meta property="og:title" content="灯哥教程之闭环位置代码前置知识">
<meta property="og:url" content="http://example.com/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/index.html">
<meta property="og:site_name" content="学无止境">
<meta property="og:description" content="​        原文链接：http:&#x2F;&#x2F;www.dengfoc.com&#x2F;#&#x2F;dengfoc&#x2F;%E7%81%AF%E5%93%A5%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%86%99FOC%E7%AE%97%E6%B3%95&#x2F;5.1FOC%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%8">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272147332.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272150972.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272204340.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272206787.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272208563.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272209801.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272211403.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272212753.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272219088.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272220915.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272221329.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311282112178.png">
<meta property="article:published_time" content="2023-11-27T13:41:05.000Z">
<meta property="article:modified_time" content="2023-11-27T13:41:05.000Z">
<meta property="article:author" content="xudonglei">
<meta property="article:tag" content="电机基本原理">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272147332.png">

<link rel="canonical" href="http://example.com/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>灯哥教程之闭环位置代码前置知识 | 学无止境</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">学无止境</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Do not bb, show me the example</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="xudonglei">
      <meta itemprop="description" content="搬砖 嵌入式">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="学无止境">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          灯哥教程之闭环位置代码前置知识
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2023-11-27 21:41:05" itemprop="dateCreated datePublished" datetime="2023-11-27T21:41:05+08:00">2023-11-27</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E7%94%B5%E6%9C%BA/" itemprop="url" rel="index"><span itemprop="name">电机</span></a>
                </span>
            </span>

          
            <span id="/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/" class="post-meta-item leancloud_visitors" data-flag-title="灯哥教程之闭环位置代码前置知识" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2023/11/27/%E7%81%AF%E5%93%A5%E6%95%99%E7%A8%8B%E4%B9%8B%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>​        原文链接：<a target="_blank" rel="noopener" href="http://www.dengfoc.com/#/dengfoc/%E7%81%AF%E5%93%A5%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%86%99FOC%E7%AE%97%E6%B3%95/5.1FOC%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%8E%9F%E7%90%86%E6%95%99%E5%AD%A6">http://www.dengfoc.com/#/dengfoc/%E7%81%AF%E5%93%A5%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%86%99FOC%E7%AE%97%E6%B3%95/5.1FOC%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E4%BB%A3%E7%A0%81%E5%8E%9F%E7%90%86%E6%95%99%E5%AD%A6</a></p>
<h3 id="闭环位置控制的本质"><a href="#闭环位置控制的本质" class="headerlink" title="闭环位置控制的本质"></a>闭环位置控制的本质</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272147332.png" style="zoom:50%;">

<p>​        在写代码之前，首先我们需要明白闭环位置控制的本质。显然，常见的需要闭环位置控制的情况就如上图所示。现在，先假设我们给电机设置期望角度为0度，此时，电机蓝色的箭头指着屏幕右方的方向，与alpha轴重合。</p>
<p>  这时，我们用手逆时针扭转电机，把电机扭转到蓝色箭头与alpha轴形成45度的偏差。这时候，电机就会变成图中右边那样，显然，此时如果需要回正到原本我们设定并且期望的0度，那么电机就要产生一个如图中红色箭头所示的相反的力矩才能够回到电机的初始位置，力矩在这里是和Uq是等效的，也就是说，我们需要产生一个合适的Uq电压值，使得电机能够顺时针回转回0位。那么<strong>所谓闭环位置控制的方法，实际上就可以归纳为怎么检测这个角度偏差，以及怎么产生合适的旋转力矩Uq的问题</strong>。</p>
<p>​        在这里，我们首先设定逆时针旋转方向为负方向，顺时针旋转方向为正方向，并且在此时，设定电机的偏差位置采用e来进行表示，因此，误差位置可以用这条公式进行计算：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272150972.png" style="zoom:80%;">

<p>​        我们接下来的问题，就是如何我们需要根据-45度求出一个力矩Uq，使得Uq能够让电机产生力矩，使得电机转子回位的问题。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272204340.png" style="zoom:57%;">

<p>​        接下来我们就开始来探寻怎样把这个45度转化为我们的电机力矩。        </p>
<p>​        显然，我们不能直接让Uq=偏差值=45，这时不合理的，首先，我们的供电电压只有12v，直接让Uq=偏差值=45会导致电压远远超过了供电电压值。实际上，我们可以通过供电电压来计算出我们Uq能设定的最大值，以12v供电为例，实际上我们能够设定的Uq最大值仅有12v/2=±6V。为什么是6v？为什么要除2？这时因为，在上一节课中，我们已经把我们的ua,ub,uc曲线移动到供电电压中央，如下图代码所示：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272206787.png" style="zoom:50%;">

<p>​        在加上了供电电压变量voltage_power_supply/2后，实际上ua,ub,uc曲线的0点就由6v开始，而这个移动是必须的，因为不这么移动，ua,ub,uc的正弦波特性会使得驱动出现负电压，如下图所示，这显然不可接受。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272208563.png" style="zoom:50%;">

<p>​        那么，移动后，显然ua,ub,uc的变化范围就只有±6了，这也影响到了uq,因此，uq的变化范围也会仅剩下±6，如下图所示：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272209801.png" style="zoom:50%;">

<p>​        由此，我们就通过供电电压，确定了Uq的最大值Uqmax，有了这个值作为参考，我们就可以很快计算出怎样才能让电机在45度偏差时需要回正所需要的力矩输出大小，也就是我们的Uq大小。</p>
<p>  假设我们希望电机在偏差达到45度的时候，电机就会输出最大的回正力矩，由于我们前面设定了逆时针旋转是正方向，也就是说，我们希望电机此时输出的Uq=-6V，和我们刚刚计算出来的Uqmax相等。那么，显然我们就可以通过这条式子，得到他们的换算关系，我们把这个计算出来的换算系数，称为Kp：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272211403.png" style="zoom:67%;">

<p>​        显然，在求出这个Kp后，我们就能够通过一个简单的乘法，列出偏差e和Uq的换算关系式：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272212753.png" style="zoom:50%;">

<p>​        对应我们的电机在e=-45度偏差的时候，会产生Uq产生接近-6v的值-5.985v。</p>
<p>  而这个Kp，正是我们常说的PID控制器中的p环系数，我们刚刚的推导，正是PID中p环的纠偏原理！</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272219088.png" style="zoom:50%;">

<p>​        当然，实际上PID控制器，还有I环和D环两环没有介绍，我们今天仅仅介绍了P环在无刷电机位置闭环上的纠偏实现！而I环和D环怎么应用在电机上，未来再说。在这里先提一嘴，避免混淆。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272220915.png" style="zoom:50%;">

<p>​        我们把刚刚我们得到的关系式提取出来，就有了上图所示的式子，Kp我们已经知道是怎么算出来的了，而这个式子中的e,则是由我们的编码器测量得到。如图中我们定制开发的as5600编码器。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311272221329.png" style="zoom:60%;">

<p>​        进一步总结起来，我们的的闭环位置控制框图就如PPT所示。相比于开环的过程，其实它就只是增加了我们刚刚前面讲的P控制器部分。可以看到，开头这里我们先通过编码器的读数算出了e，然后将这个e输入到P控制器中。当我们按照前面所讲述的内容计算并设定好我们所需要的P参数后，P控制器就会计算出一个可以用于纠正偏差的Uq，并将其输入给FOC算法，计算出所需要的Ualpha和Ubeta，以及最后输出ua,ub,uc给无刷电机，驱动电机转动，这些都是上面课程的内容了。通过这一波操作，我们就能够完成电机位置闭环。</p>
<p>  需要额外注意的是，电机位置闭环控制中，帕克逆变换计算所需要用到的电角度，也是由编码器测出的，当让，编码器能测出的只是机械角度，还需按照之前课程的内容，给编码器乘上极对数才能够转化为帕克逆变换所需要的电角度。</p>
<h3 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202311282112178.png" style="zoom:67%;">

<p>​        就是我们当前所讲述的位置闭环其实只是方式1，也就是位置-力闭环控制，有些人也称之为力位控制，当然，实际上我们今天的控制并没有完整的实现位置-力控制，我们仅仅只是对位置进行了闭环而尚未对力矩进行闭环。</p>
<p>  另外，实现位置闭环的方式也不仅仅只有方式1这一种，实际上，方式2也很常见，就是通过位置环偏差，先输出一个速度环期望，再输出一个力矩期望给力矩环，实现三环嵌套位置闭环控制。当然，基础的学习还是得从简单开始。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E7%94%B5%E6%9C%BA%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86/" rel="tag"># 电机基本原理</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2023/11/21/FD2606S%E8%8A%AF%E7%89%87%EF%BC%9AMOS%E7%AE%A1%E5%8D%8A%E6%A1%A5%E9%A9%B1%E5%8A%A8%E7%94%B5%E8%B7%AF%E6%96%B9%E6%A1%88/" rel="prev" title="FD2606S芯片：MOS管半桥驱动电路方案">
      <i class="fa fa-chevron-left"></i> FD2606S芯片：MOS管半桥驱动电路方案
    </a></div>
      <div class="post-nav-item">
    <a href="/2023/12/01/%E4%BD%BF%E7%94%A8wx%E4%B8%AD%E7%9A%84Panel/" rel="next" title="使用wx中的Panel">
      使用wx中的Panel <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%97%AD%E7%8E%AF%E4%BD%8D%E7%BD%AE%E6%8E%A7%E5%88%B6%E7%9A%84%E6%9C%AC%E8%B4%A8"><span class="nav-number">1.</span> <span class="nav-text">闭环位置控制的本质</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9"><span class="nav-number">2.</span> <span class="nav-text">注意事项</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">xudonglei</p>
  <div class="site-description" itemprop="description">搬砖 嵌入式</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">283</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">19</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">67</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xudonglei</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'BT0Qw9HcTpPv1a6cT1iDBXKz-gzGzoHsz',
      appKey     : 'LMCMh8v02JTMFAwKNRcgoizI',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
